﻿using Common.Communal;
using ERP.Domain.CustomerSupplier;
using MediatR;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Sell.Api.Read.Application.Command.CustomerCommand;

namespace Scheduling.Api.Read.Controllers
{
    [Route("api/[controller]/[action]")]
    [ApiController]
    public class SupplierController : ControllerBase
    {
        public IMediator Mediator { get; }
        public SupplierController(IMediator _Mediator)
        {
            Mediator = _Mediator;
        }
        /// <summary>
        /// 供应商管理列表
        /// </summary>
        /// <param name="request"></param>
        /// <param name="cancellationToken"></param>
        /// <returns></returns>
        /// <exception cref="NotImplementedException"></exception>
        [HttpGet]
        public async Task<ApiResult<ApiPaging<Supplier>>> Supplierlist([FromQuery]SupplierlistCommand request)
        {
          return await Mediator.Send(request);
        }
    }
}
